[pull] master from rust-lang:master#76
Merged
Merged
Conversation
ci: use `macos-15-intel` runner
Pull recent changes from https://github.com/rust-lang/rust via Josh. Upstream ref: rust-lang/rust@e22c616 Filtered ref: rust-lang/stdarch@47c3de5 Upstream diff: rust-lang/rust@e4fdb55...e22c616 This merge was created using https://github.com/rust-lang/josh-sync.
Rustc pull update
Add AMX-AVX512 BF16 intrinsics
loongarch: Use `intrinsics::simd` for selected LSX/LASX intrinsics
Pull recent changes from https://github.com/rust-lang/rust via Josh. Upstream ref: rust-lang/rust@68ffae4 Filtered ref: rust-lang/compiler-builtins@7602939 Upstream diff: rust-lang/rust@d0442e2...68ffae4 This merge was created using https://github.com/rust-lang/josh-sync.
mark `vstl1_*` functions as unsafe
Pull recent changes from https://github.com/rust-lang/rust via Josh. Upstream ref: rust-lang/rust@045b177 Filtered ref: rust-lang/stdarch@65061a8 Upstream diff: rust-lang/rust@e22c616...045b177 This merge was created using https://github.com/rust-lang/josh-sync.
Rustc pull update
loongarch: Refactor portable SIMD helper naming and intrinsic paths
Fix `fixupimm`
Revert changing number of passes depending on number of parameters
…anBrouwer,jieyouxu Disable rust-analyzer tests on LLVM 21 The rust-analyzer tests have been frequently failing with a SIGSEGV on CI in the LLVM 21 runners. In my investigation, this seems to be fixed with LLVM 22. It was suggested that we should just disable these tests. There wasn't a particularly convenient way to detect if this is running with LLVM 21, so I decided to just check the CI_JOB_NAME which contains the image name which in our case includes the string "llvm-21". Fixes rust-lang/rust#156460
Clarify UTF-16 decoding errors Fix UTF-16 error messages as suggested in rust-lang/rust#116258.
Privacy: try use queue instead of fixed-point iteration Earlier: iterate until updates of `EffectiveVisibility` occur. Now: if an update occurs, then we put in the queue those items that may be affected by this update. Iterate until there are items in the queue. r? @petrochenkov
Make bitset `would_modify_words` more vectorizer-friendly Currently this function compares a single pair of `u64` at a time, which is potentially slower than comparing multiple words before each early-exit check, especially for the large chunks used by ChunkedBitSet. Perf shows a notable improvement in `cranelift-codegen`, which is the one benchmark that is known to stress these code paths. - Incorporates rust-lang/rust#153759.
Revert tearing changes to `dbg!` Since the primary change to `dbg!` in rust-lang/rust#149869, we've been chasing a few regressions: * rust-lang/rust#153850, fixed by rust-lang/rust#154074 * rust-lang/rust#154988, fixed by rust-lang/rust#154994 * rust-lang/rust#155902, proposed fix in rust-lang/rust#155915 We already reverted this once, on beta only to prevent these regressions from shipping in 1.95. In that most recent PR, we decided that it would be better to revert `dbg!` to its original state everywhere (`main` and 1.96-`beta`), and then we can consider it from scratch later. So here I've reverted the change and its fixes, but kept the regression tests, including the pending one. cc @joboet @dianne @rust-lang/libs @rustbot label beta-nominated
…GuillaumeGomez Stabilize `--remap-path-prefix` in rustdoc # Stabilization report of `--remap-path-prefix` in rustdoc ## Summary `rustc` supports remapping source paths prefixes as a best effort in all compiler generated output, including compiler diagnostics, debugging information, macro expansions, documentation, doctests, etc. This is useful for normalizing build products, for example, by removing the current directory out of the paths emitted into object files. This stabilization stabilize the same flag used by `rustc` in `rustdoc`. There are no tracking issue. Stabilization was discussed at the last meeting, [#t-rustdoc/meetings > 2026-04-13 @ 💬](https://rust-lang.zulipchat.com/#narrow/channel/393423-t-rustdoc.2Fmeetings/topic/2026-04-13/near/585264347). ### What is stabilized The rustdoc `--remap-path-prefix` flag is being stabilized by this PR. (It's equivalent to rustc flag) It permits remapping (as a best effort) source path prefixes in all output, including diagnostics, debug information, macro expansions, generated documentation, etc. It takes a value of the form `FROM=TO` where a path prefix equal to `FROM` is rewritten to the value `TO`. #### Example ```sh rustdoc src/lib.rs --remap-path-prefix="$PWD=/foo" ``` ### What isn't stabilized Neither `--remap-path-scope` (~~soon to be added as unstable in `rustdoc`~~ rust-lang/rust#155451) or the already unstable in `rustc` `documentation` scope are being stabilized or added here. ## Design ### Implementation history - rust-lang/rust#107099 ### Unresolved questions There are no unresolved questions. ### Post-implementation changes The implementation has evolved with `rustc`, but no changes to the flag it-self have been made. ### Nightly extensions The `documentation` scope, which currently can only be set from `rustc`, as we need to add an equivalent to the `--remap-path-scope` flag, ~~which is planned~~ (EDIT: rust-lang/rust#155451), but not required, the current `--remap-path-prefix` defaults to the `all` scope, like `rustc`. ### Doors closed We are committing to having to having a flag that permits remapping paths. The compiler team already made the same commitment. ## Feedback ### Call for testing No call for testing has been done. ### Nightly use Unable to determine. A [GitHub search](https://github.com/search?q=%20%2F--remap-path-prefix%2F&type=code) only seems to only reveals the `rustc` usage (over 6k though). Rust-for-Linux is using the [flag](https://github.com/torvalds/linux/blob/e80d033851b3bc94c3d254ac66660ddd0a49d72c/Makefile#L1151-L1153). ## Implementation ### Major parts - rust-lang/rust#107099 - rust-lang/rust#149709 - rust-lang/rust#150172 - rust-lang/rust#151589 ### Coverage - [`tests/rustdoc-ui/remap-path-prefix-failed-doctest-output.rs`](https://github.com/rust-lang/rust/blob/12f35ad39ed3e39df4d953c46d4f6cc6c82adc96/tests/rustdoc-ui/remap-path-prefix-failed-doctest-output.rs) - [`tests/rustdoc-ui/remap-path-prefix-invalid-doctest.rs`](https://github.com/rust-lang/rust/blob/12f35ad39ed3e39df4d953c46d4f6cc6c82adc96/tests/rustdoc-ui/remap-path-prefix-invalid-doctest.rs) - [`tests/rustdoc-ui/remap-path-prefix-macro.rs`](https://github.com/rust-lang/rust/blob/12f35ad39ed3e39df4d953c46d4f6cc6c82adc96/tests/rustdoc-ui/remap-path-prefix-macro.rs) - [`tests/rustdoc-ui/remap-path-prefix-passed-doctest-output.rs`](https://github.com/rust-lang/rust/blob/12f35ad39ed3e39df4d953c46d4f6cc6c82adc96/tests/rustdoc-ui/remap-path-prefix-passed-doctest-output.rs) - [`tests/rustdoc-ui/lints/remap-path-prefix-lint.rs`](https://github.com/rust-lang/rust/blob/12f35ad39ed3e39df4d953c46d4f6cc6c82adc96/tests/rustdoc-ui/lints/remap-path-prefix-lint.rs) - [`tests/rustdoc-html/import-remapped-paths.rs`](https://github.com/rust-lang/rust/blob/12f35ad39ed3e39df4d953c46d4f6cc6c82adc96/tests/rustdoc-html/import-remapped-paths.rs) - [`tests/rustdoc-html/macro/external-macro-src.rs`](https://github.com/rust-lang/rust/blob/12f35ad39ed3e39df4d953c46d4f6cc6c82adc96/tests/rustdoc-html/macro/external-macro-src.rs) ### Outstanding bugs There are no outstanding bugs regarding `--remap-path-prefix` in `rustdoc`. There are [caveats and limitation](https://doc.rust-lang.org/nightly/rustc/remap-source-paths.html#caveats-and-limitations) in `rustc`, but they mostly concern generated object files, which we don't really have. ### Outstanding FIXMEs There are no FIXME regarding `--remap-path-prefix`. ## Acknowledgments - @edward-shen - @Urgau
Use strongly typed wrapped indices in `VecDeque` This is far from perfect, but it would have prevented rust-lang/rust#151769. r? @joboet
stdarch subtree update Subtree update of `stdarch` to rust-lang/stdarch@5e930b6. Created using https://github.com/rust-lang/josh-sync. r? @ghost
Stabilize bool_to_result Closes rust-lang/rust#142748
std::net::tcp: let the OS pick the port numbers See rust-lang/rust#156377 for context. I only did the TCP tests for now to see whether there are any unexpected problems.
Merge several HIR-level queries into one Now four queries (`local_def_id_to_hir_id`, `opt_hir_owner_nodes`, `opt_ast_lowering_delayed_lints`, `in_scope_traits_map`) were replaced with regular methods which acts like getters. An `hir_owner` query was added that returns a `ProjectedMaybeOwner` that contains all those fields. `hir_attr_map` remains a separate query as adding attributes to `ProjectedMaybeOwner` led to [perf regressions](rust-lang/rust#155678 (comment)). There is a similar issue with `in_scopes_trait_map`, but according to the comments from rust-lang/rustc-perf#2436 it is a rare case. Most of the changes in incremental tests are renames from `opt_hir_owner_nodes` -> `hir_owner`, but there are few cases when new dirty queries were added. r? @petrochenkov r? @oli-obk
compiler-builtins subtree update Subtree update of `compiler-builtins` to rust-lang/compiler-builtins@8bf3293. Created using https://github.com/rust-lang/josh-sync. r? @ghost
…boet lib: specialize Clone of array IntoIter This PR adds the `TrivialClone` specialization to the `PolymorphicIter` type, which `array::IntoIter` uses. I also added another coretest for the default case (already existing test catches the specialized one). There are no unwinding concerns since `TrivialClone` means cloning = copying and we never call `Clone::clone`. `array:IntoIter` is being used on a lot of places in both `core` and in user code, and `array::IntoIter` (nor does its users) override `Clone` often and just delegate to the inner type `PolymorphicIter` which does not yet do the `TrivialClone` specialization and is burdened by the iterator and unwind safety shenanigans for all types, so this PR should address some of that. This should in turn slightly reduce both stack usage and remove unwinding prologue/epilogue etc. from such functions and improve our `-Cno-prepopulate-passes` codegen too. perf: https://godbolt.org/z/eTPjj3hP3
Avoid loading HIR for check_well_formed on type declarations r? @compiler-errors
This fixes a compilation error from rustc_driver not getting included when some rustc crates are being depended on.
This ensures bootstrap enables the right feature for proc-macro-srv to work.
`rust-analyzer` subtree update Subtree update of `rust-analyzer` to 123c166. Created using https://github.com/rust-lang/josh-sync. r? @ghost
Stabilize `Result::map_or_default` and `Option::map_or_default` Tracking issue: rust-lang/rust#138099 FCP completed: rust-lang/rust#138099 (comment) Closes: rust-lang/rust#138099
add `extern "tail"` calling convention Maps to LLVM's `tailcc` and hence inherits all its problems. This calling convention at least compiles on: - `x86_64` - `aarch64` It also compiles on - `s390x` - `loongarch64` But I've been told by target maintainers that this is kind of unintentional, and it's not tested in LLVM. For most backends LLVM does not have support and fails loudly.
…generics-ice, r=chenyukang diagnostics: Fix ICE building a trait ref in method suggestions Fixes rust-lang/rust#157189 When a method call doesn't resolve, the no-method-found diagnostic probes every trait for one with a same-named method and builds a trait ref for it to spot trait items duplicated across crate versions. It only ever passed the receiver as the single argument, which works only when the trait's one generic is `Self`. Call `.borrow()` on something and the probe finds `Borrow`, whose extra `Borrowed` parameter leaves the args out of step with the trait's generics, so `debug_assert_args_compatible` fires. Same crash when the receiver type isn't known and there are zero args. Now the args come from `GenericArgs::for_item`: the receiver fills `Self` when we have it, fresh inference variables cover the rest.
…ately, r=notriddle Parse deprecated note links separately in rustc_resolve Fixes rust-lang/rust#157326 `rustc_resolve` pre-caches intra-doc link resolutions for rustdoc. It previously parsed doc comments and `#[deprecated(note = "...")]` text as one Markdown document.
fix windows-gnu TLS leak Running the std tests on windows-gnu [has a memory leak](https://rust-lang.zulipchat.com/#narrow/channel/269128-miri/topic/Miri.20test-libstd.20Failure.20.282026-06.29/near/599991435). After lots of false leads, here's what I found: - The `guard::enable` function needs to be called on each thread; it the ensures that when the thread finishes, cleanup is performed. - The windows `LazyKey` calls `guard::enable` in its `init` function. That means it only gets called on the first thread that accesses this key! - We have a `guard::enable` call in the `thread::spawn` path. However, when running tests, there are two copies of std, so there are two guards. `crate::thread::spawn` sets up the guard for the current crate (the one built with `cfg(test)`), but does not set up the guard for `realstd` (the std crate in the sysroot). This is a regression introduced by rust-lang/rust#148799. Previously, `guard::enable` was pretty much a NOP on Windows so not calling it didn't cause problems. rust-lang/miri-test-libstd#123 has confirmed that this indeed fixes the leak. The first commit is a drive-by fix where I found a function name kind of confusing. r? @ChrisDenton Cc @joboet
…k, r=Kobzol compiletest: inject `#![windows_subsystem = "windows"]` to debuginfo tests on Windows So that we don't get a bunch of console windows spawned by the debuggees. r? @Kobzol (or bootstrap/compiler)
remove solaris implementation for File::lock, it has the wrong semantics Fixes rust-lang/rust#157390 r? @the8472
Rename `SyncView::{as_pin => as_pin_ref}`
This addresses the resolution of a naming concern from rust-lang/rust#98407.
r? BurntSushi
Move tests box Hi, I have moved some tests into the box folder. Fixes [133895](rust-lang/rust#133895)
Add unwinder_private_data_size for wasm64 target Fixes missing unwinder_private_data_size for the wasm64 architecture
docs: make `Rc::into_raw` clickable in `Rc::increment_strong_count` doc adds doc link
…Mark-Simulacrum Stabilize `PathBuf::into_string` Here's the [tracking issue](rust-lang/rust#156203). FCP completed on the tracking issue.
…ed, r=Mark-Simulacrum Remove FIXME about impl PinCoerceUnsized for UnsafePinned<T> The `PinCoerceUnsized` trait may only be implemented for smart pointer types, but `UnsafePinned` has no indirection. Thus, it will not be correct to add this impl. Follow-up to rust-lang/rust#137043 cc @Sky9x
Revert "LLVM 23: Run AssignGUIDPass in some places" This reverts commit cdb73bb67707f78b321fe5579bcb9c128f45c352. The LLVM side change was reverted.
clarify compiler_fence (and fence) docs Also see rust-lang/libs-team#794 for more discussion. Cc @Amanieu @m-ou-se
Debug assert that parsed attributes are in the `BUILTIN_ATTRIBUTE_MAP` There are currently two sources of truth for which attributes are builtin, the `BUILTIN_ATTRIBUTE_MAP` and the list of parsers. The long term goal is to get rid of the `BUILTIN_ATTRIBUTE_MAP` , but because of the way that crates depend on eachother this is not trivial. This PR makes sure the sources don't diverge. r? @mejrs
…anBrouwer Rename `errors.rs` file to `diagnostics.rs` (1/N) `errors.rs` (and sometimes `error.rs`, depends on the crate) are not coherent with their content which can be both errors and lints. However, they're both diagnostics so it would make more sense to rename all of them into `diagnostics.rs`. I only did 3 crates for a start to confirm it's ok to go forward with this. I think it was discussed with @JonathanBrouwer so setting them as reviewer. :3 r? @JonathanBrouwer
…ct, r=ShoyuVanilla Convert `QueryRegionConstraint` into a struct as per in fixme
std tests: skip a slow test on Miri This is just a big loop to compare exit status handling, and the loop is a bit too big for Miri.
ci: bump x86_64-gnu base image to 26.04 This PR updates the x86_64-gnu CI Docker base image from 22.04 to 26.04. r? @Kobzol
…Mark-Simulacrum Add `BTree::append()` change to 1.96.0 relnotes This change affected someone's code, reported in rust-lang/rust#157436. I copied the text from rust-lang/rust#157496, but I figured that it belonged to the "Compatibility Notes" section, not "Internal Changes". See discussion at https://rust-lang.zulipchat.com/#narrow/channel/241545-t-release/topic/Procedure.20for.20modifying.20past.20release.20notes/with/600817427
Rollup of 25 pull requests Successful merges: - rust-lang/rust#157251 (`rust-analyzer` subtree update) - rust-lang/rust#157533 (Subtree sync for rustc_codegen_cranelift) - rust-lang/rust#154742 (Add APIs for case folding to the standard library) - rust-lang/rust#155144 (mir_build: Add an extra intermediate step in MIR building for patterns ) - rust-lang/rust#156222 (Stabilize `Result::map_or_default` and `Option::map_or_default`) - rust-lang/rust#157016 (add `extern "tail"` calling convention) - rust-lang/rust#157264 (diagnostics: Fix ICE building a trait ref in method suggestions) - rust-lang/rust#157386 (Parse deprecated note links separately in rustc_resolve) - rust-lang/rust#157483 (fix windows-gnu TLS leak) - rust-lang/rust#157488 (compiletest: inject `#![windows_subsystem = "windows"]` to debuginfo tests on Windows) - rust-lang/rust#157509 (remove solaris implementation for File::lock, it has the wrong semantics) - rust-lang/rust#157521 (Rename `SyncView::{as_pin => as_pin_ref}`) - rust-lang/rust#156136 (Move tests box) - rust-lang/rust#156573 (Add unwinder_private_data_size for wasm64 target) - rust-lang/rust#156783 (docs: make `Rc::into_raw` clickable in `Rc::increment_strong_count` doc) - rust-lang/rust#156840 (Stabilize `PathBuf::into_string`) - rust-lang/rust#156936 (Remove FIXME about impl PinCoerceUnsized for UnsafePinned<T>) - rust-lang/rust#157365 (Revert "LLVM 23: Run AssignGUIDPass in some places") - rust-lang/rust#157380 (clarify compiler_fence (and fence) docs) - rust-lang/rust#157471 (Debug assert that parsed attributes are in the `BUILTIN_ATTRIBUTE_MAP`) - rust-lang/rust#157485 (Rename `errors.rs` file to `diagnostics.rs` (1/N)) - rust-lang/rust#157494 (Convert `QueryRegionConstraint` into a struct) - rust-lang/rust#157526 (std tests: skip a slow test on Miri) - rust-lang/rust#157531 (ci: bump x86_64-gnu base image to 26.04) - rust-lang/rust#157556 (Add `BTree::append()` change to 1.96.0 relnotes) Failed merges: - rust-lang/rust#155527 (Replace printables table with `unicode_data.rs` tables)
minor: Bump `peaceiris/actions-gh-pages`
This updates the rust-version file to 43a4909ee98ed4d006d9d773f5d94dc58e34f846.
Pull recent changes from https://github.com/rust-lang/rust via Josh. Upstream ref: rust-lang/rust@43a4909 Filtered ref: 5935dd5 Upstream diff: rust-lang/rust@ba0949a...43a4909 This merge was created using https://github.com/rust-lang/josh-sync.
minor: sync from downstream
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )